package com.lupengning.mybatisplus.controller;

import com.lupengning.mybatisplus.entity.User;
import com.lupengning.mybatisplus.mapper.UserMapper;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.CrossOrigin;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@CrossOrigin
@RequestMapping("/user")
public class UserController {

  @Autowired
  private UserMapper userMapper;

  @GetMapping("list")
  public List<User> list() {
    return userMapper.selectList(null);
  }
}
